-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debug widget into 3D view #59483
Conversation
src/app/3d/qgs3dmapcanvaswidget.cpp
Outdated
@@ -305,6 +308,19 @@ Qgs3DMapCanvasWidget::Qgs3DMapCanvasWidget( const QString &name, bool isDocked ) | |||
|
|||
onTotalPendingJobsCountChanged(); | |||
|
|||
QAction *toggleDebugPanel = toolBar->addAction( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should make this visible by default. It's not something the average user ever needs, and adding it to the toolbar just contributes to UI clutter. Instead of a toolbar action, how about some hidden key shortcut to toggle the pane?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but I'd rather have a Show debug panel
checkbox in advanced settings page instead of completely hiding it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the @uclaros approach of having a checkbox + I can add a keyboard shortcut
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the setting into advanced sub-category of options and added a Ctrl+Shift+d shortcut for the panel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ctrl+Shift+d
That's already used for opening Data Source Manager. How about F12? That's used for the dev tools panel in the main window, so I think it'd be nice to use that here too. (I realise that if the 3d view is docked then F12 would only work if the 3d view is focused, but that same behavior would also be present with Ctrl+Shift+D due to the conflict with the Data Source Manager shortcut)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay that makes sense. I guess having an overlap in shortcuts is unavoidable, but it's definitely better UX on F12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson after testing the change, F12 on docked windows doesn't work at all. For the previous combination I at least got a window about shortcut ambiguity, but on F12 I don't get anything. It just doesn't work. In stand alone window it works.
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
side note: it is quite hard to see checkboxes in the dark mode |
Regarding the checkboxes, yes totally agree however that's the theme issue. I'm using the default theme in dark mode, other themes don't have this issue. Of course the issue is in the whole app not just in the debug panel |
Currently this bricks the screen render
This commit adds new debug side panel (similar to navigation widget), which moves several existing options from settings/navigation panel here. Camera Info has been moved from navigation panel and from table changed into input elements (preparation for another feature). Show map tile info, Show bounding boxes, Show camera's view/rotation center, Show light sources, Show debug overlay, Debug shadow map, Debug Depth map options have been moved from advanced sub-category of options. New Stop scene updates option has been created.
Debug camera info is always shown Debug depth map widget's default position is moved to bottom left corner, so it won't collide with axis widget Docking icon is moved to the last position Toolbar icon size is finally correct, changes with the window docked state as it should
Debug panel in 3d map view can be set in advanced settings or by keyboard shortcut CTRL + SHIFT + d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good - finally we're on the way to proper developer tools for 3D scenes 🙂
1c7fab5
to
673fe8d
Compare
@Withalion A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
@Withalion |
Description
The new debug side panel moves all relevant debug settings into one place, from multiple into one easily accessible side
panel. Furthermore the change implemented in #58947 was missing any option to toggle this on/off.
Features in this PR:
Standalone window:
Docked window: